package com.saas.sql;

public class ExtNewsQuery
{
  public static String extnews_INSERT_EXTNEWS = "insert extnews(user_id,cust_id,title,model,content,info_state,class_id,extnews_root_type,extnews_root_id,add_date,oper_time,attach_id,web_tag) values(:VUSER_ID,:VCUST_ID,:VTITLE,:VMODEL,:VCONTENT,:VINFO_STATE,:VCLASS_ID,:VEXTNEWS_ROOT_TYPE,:VEXTNEWS_ROOT_ID,now(),now(),:VATTACH_ID,'0')";
  public static String extnews_SEL_EXTNEWS_BY_ID = "select extnews_id,title,model,content,info_state,extnews_root_id product_class,add_date,oper_time from extnews where cust_id=:VCUST_ID and title like :VTITLE and class_id=:VCLASS_ID and info_state<>9 order by oper_time desc";
  public static String extnews_SEL_ONE_EXTNEWS = "select extnews_id,title,model,content,info_state,extnews_root_id product_class,add_date,oper_time,attach_id from extnews where extnews_id=:VID";
  public static String extnews_UPDATE_EXTNEWS = "update extnews set title=:VTITLE,info_state=:VINFO_STATE,extnews_root_id=:VEXTNEWS_ROOT_ID,content=:VCONTENT,oper_time=now(),attach_id=:VATTACH_ID,web_tag='0' where extnews_id=:VEXTNEWS_ID";
  public static String extnews_DELETE_EXTNEWS = "delete from extnews where extnews_id=:VEXTNEWS_ID";
  public static String extnews_SEL_EXTNEWS = "select extnews_id,title,model,content,info_state,extnews_root_id product_class,add_date,oper_time from extnews where title like :VTITLE and class_id=:VCLASS_ID and info_state=:VINFO_STATE order by oper_time ";
  public static String extnews_SEL_EXTNEWS_DESC = "select extnews_id,title,model,content,info_state,extnews_root_id product_class,add_date,oper_time from extnews where title like :VTITLE and class_id=:VCLASS_ID and info_state=:VINFO_STATE order by oper_time desc";
  public static String extnews_CHECK_EXTNEWS = "update extnews set info_state=:VINFO_STATE,check_USER=:VCHECK_USER,check_time=now() where extnews_id=:VEXTNEWS_ID";
  public static String attach_ADD_PIC = "insert attach(attach_id,attach_root_id,file_type,file_path,add_date) values(:VATTACH_ID,:VATTACH_ROOT_ID,:VFILE_TYPE,:VFILE_PATH,now())";
  public static String attach_EDIT_PIC = "update attach set file_path=:VFILE_PATH where attach_root_id=:VATTACH_ROOT_ID";
}

